package guo.mybatis;

import guo.mybatis.config.Configuration;
import guo.mybatis.service.UserService;

import java.sql.Connection;

public class Main {
	public static void main(String[] args) {
		ClassLoader classLoader = Main.class.getClassLoader();
		Configuration configuration = new Configuration(classLoader,"mybatis.xml");
		Connection connection = configuration.getJdbcUtils().openConnection();
		UserService userService = new UserService();
		String name = userService.selectNameById(connection,1);
		System.out.println(name);
	}
}


